package com.yan.demo4;

import java.lang.annotation.*;

/**
 * @author taoge
 * @Date 2024/8/15 9:51
 * @Description 可重复注解
 */
public class Demo4 {

    public static void main(String[] args) {


    }
    @Book
    @Book
    @Book
    @Book
    @Book
    public void show(){}

}

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Repeatable(BookArr.class)
@interface Book {

}

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@interface BookArr{
    Book[] value();
}
